package Com.amit.IO;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.SequenceInputStream;


public class Lab6 {

	public static void main(String[] args) throws Exception {
		
FileInputStream fin1=new FileInputStream("C:\\Users\\NETA JEE\\Desktop\\Amit.txt");
		
FileInputStream fin2=new FileInputStream("C:\\Users\\NETA JEE\\Desktop\\Anil.txt");

FileOutputStream fout=new FileOutputStream("C:\\Users\\NETA JEE\\Desktop\\raj.txt");

SequenceInputStream s1=new SequenceInputStream(fin1, fin2);

int i;

while((i=s1.read())!=-1)
{
fout.write(i);	

}

s1.close();
fout.close();
fin1.close();
fin1.close();
		
	}

}
